package cn.waqwb.s03;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Classname School
 * @Description TODO
 * @Date 2022/9/15 19:18
 * @Created by Administrator
 */
@Component("schoolSup")   //交给spring创建对象
public class School {
    @Value("清华")
    private String name;
    @Value("北京")
    private String address;

    public School(){
        System.out.println("School的无参构造方法");
    }

    @Override
    public String toString() {
        return "School{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}
